#include "platform.h"
#include "StaLed.h"
#include "MultiTimer.h"

StaLed_t myled ;
MultiTimer timer1;

void timer1_cb(MultiTimer* timer, void* userData) ;
uint32_t Platform_Tik(){
    return TIK;
} ;
void main()
{
    StaLed_Init(&myled,&LED) ;
    StaLed_Set(&myled,0,STALED_BLINK_LITE) ; // 0100 1001

    MultiTimerInstall(Platform_Tik) ;
    MultiTimerStart(&timer1, 125, timer1_cb, (void *)125);  // LED 
	while(1){
        MultiTimerYield();
	}

    
	return ;
}

// LED指示灯 
void timer1_cb(MultiTimer* timer, void* userData) {
    StaLed_Yield(&myled) ;
    MultiTimerStart(timer, (int)(int *)userData, timer1_cb, userData);
}
